package com.ihr360.commons.utils;

import javax.persistence.criteria.Path;

public class JpaCriteriaPathUtils {
    public static  Path getPath(Path root, String attributeName) {
        String[] attributes = attributeName.split("\\.");
        Path path = root;
        for (String attribute : attributes) {
            path = path.get(attribute);
        }
        return path;
    }
}